package org.jeecgframework.web.service;
import java.io.Serializable;
import java.util.List;

import org.jeecgframework.core.common.service.CommonService;
import org.jeecgframework.web.system.pojo.base.CbsInvoiceInfoEntity;
import org.jeecgframework.web.system.pojo.base.CbsProcurementNoteEntity;
import org.jeecgframework.web.system.pojo.base.CbsProcurementPartEntity;

public interface CbsProcurementNoteServiceI extends CommonService{
	
 	public <T> void delete(T entity);
 	
 	public <T> Serializable save(T entity);
 	
 	public <T> void saveOrUpdate(T entity);
 	
 	/**
	 * 默认按钮-sql增强-新增操作
	 * @param id
	 * @return
	 */
 	public boolean doAddSql(CbsProcurementNoteEntity t);
 	/**
	 * 默认按钮-sql增强-更新操作
	 * @param id
	 * @return
	 */
 	public boolean doUpdateSql(CbsProcurementNoteEntity t);
 	/**
	 * 默认按钮-sql增强-删除操作
	 * @param id
	 * @return
	 */
 	public boolean doDelSql(CbsProcurementNoteEntity t);

    public List<CbsProcurementNoteEntity> findProcurementByCinema(String cinemaId);

    public List<CbsProcurementNoteEntity> findProcurementByContactCinema(String userName);

    /**
     * 构建订单编号
     * @return 订单编号规则：SA+YY+XXXXXX。其中YY代表订单创建日期（例如：16代表2016年），XXXXXX表示编号，每年由000001开始
     */
    public String genProcurementNo();

    public CbsProcurementNoteEntity setNotePriceAndPartShowPrice(CbsProcurementNoteEntity note);

    public CbsProcurementPartEntity setNotePartPrice(CbsProcurementPartEntity notePart);

    public CbsProcurementPartEntity setPartPriceWithType(CbsProcurementPartEntity notePart,String bpType);

    public CbsProcurementNoteEntity handleNoteInvoice(CbsProcurementNoteEntity note, String invoice);
}
